package com.itheima.controller;

import com.itheima.R;
import com.itheima.service.ConfigService;
import com.itheima.vo.ConfigAllVO;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
@RequestMapping("/sys_config")
public class ConfigController {

    private final ConfigService configService;

    /**
     * 所有配置数据
     *
     * @return {@link R}
     */
    @GetMapping("/all")
    public R<ConfigAllVO> all(){
        ConfigAllVO configAllVO = configService.all();
        return R.success(configAllVO);
    }

}
